/**
 * Created by dh.huang on 2016/9/7.
 */

angular.module('inspinia')
  .controller('afterloadingCtrl',['$scope','values',function($scope,values){

    $scope.form = {
      patientName:'张三',
      gender:'1',
      age:23,
      caseNum:'1001',
      planNum:'2001',
      areaNum:'301',
      bedNum:'1201',
      machineNum:'001',
      chargeRecord:'',
      clinical:'严重脑瘫 ',
      part:''
    };
    $scope.treatWay = values.treatWay;
    $scope.treatTechnology = values.treatTechnology_Afterloading;
    $scope.imageGuide = values.imageGuide;
    $scope.treatTechnology2=[];
    $scope.treatTechnology3=[];
    $scope.imageGuide2=[];
    $scope.imageGuide3=[];

    $scope.radiationApplicator = values.radiationApplicator;
    $scope.referencePoint = values.referencePoint;

    var init = function(){
      for(var i =0;i<$scope.treatTechnology.length;i++){
        if(2 < i && i <= 3){
          $scope.treatTechnology2.push($scope.treatTechnology[i]);
        }
        else if(3<i){
          $scope.treatTechnology3.push($scope.treatTechnology[i]);
        }
      }
      for(var i=0;i<$scope.imageGuide.length;i++){
        if(1<i && i<=3){
          $scope.imageGuide2.push($scope.imageGuide[i]);
        }
        else if(3<i){
          $scope.imageGuide3.push($scope.imageGuide[i]);
        }
      }
    }
    init();
    $scope.submucosal= '';
  }])
